package com.xc.shopping_font.Controller;

import com.xc.shopping_font.common.Result;
import com.xc.shopping_font.entity.dto.HomeGoodsSaleDto;
import com.xc.shopping_font.service.HomeCategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Slf4j
@RequestMapping("/homeCate")
public class HomeCategoryController {

    @Resource
    public HomeCategoryService homeCategoryService;


    @GetMapping("/homegoodsale")
    public Result getGoodsSale(){
        List<HomeGoodsSaleDto> list = homeCategoryService.getGoodsSale();
        return Result.success(list);
    }


}
